// pages/buy/buy.js
var app = getApp();
Page({

  data: {
    option1: [
      { text: '综合排序', value: 0 },
      { text: 'date排序', value: 1 },
    ],
    value1: 0,
    cityTitle:"城市",
    buyList:[
      {
        title:"标题1",
        city:"广东广州",
        date:"2020-11-12",
        num:"22"
      },
      {
        title:"标题2",
        city:"广东深圳",
        date:"2020-11-12",
        num:"22"
      },
      {
        title:"标题3",
        city:"广东佛山",
        date:"2020-11-12",
        num:"22"
      },
      {
        title:"标题4",
        city:"广东东莞",
        date:"2020-11-12",
        num:"22"
      },
      {
        title:"标题5",
        city:"江西赣州",
        date:"2020-11-12",
        num:"22"
      },
      {
        title:"标题6",
        city:"江西南昌",
        date:"2020-11-12",
        num:"22"
      },
      {
        title:"标题6",
        city:"江西九江",
        date:"2020-11-12",
        num:"22"
      },
    ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  onPublish(){
    if(!app.isLogin()){
      app.login(function (userInfo) {
        wx.navigateTo({url: "../publish/publish"})
      })
    }else{
      wx.navigateTo({url: "../publish/publish"})
    }
  }
})